<#assign title="找回密码—手机找回" />
<#include 'common/header.html' />
<link rel="stylesheet" href="${ctx}${themes_path}/css/other.css" type="text/css" />
<div id="findpwd_wrapper">
<!-- 判断s码是否正确 0为成功,1为失败 -->
	<div class="findpwd-box">
		<h1>修改新密码<span>大侠，这回一定要记住密码，千万别忘啦</span></h1>
		<form  id="findPasswordForm" method="post"  class="validate">
			<div class="back-password-blank"></div>
			<div class="back-password-same">
				<span>请输入密码：</span>
				<input id="passwd" name="password" type="password" isrequired="true"   class="inputstyle _x_ipt" tabindex="1" autocomplete="off" />
			</div>
			<div class="back-password-same">
				<span>确认密码：</span>
				<input id="conpasswd" type="password"   tabindex="2" name="conpasswd"  class="inputstyle _x_ipt" fun='checkpwd' autocomplete="off" isrequired="true"  />
			</div>
			<div class="btn-div" id="back-password-btn">
				<input type="button" value="修改" id="apply" class="yellow-btn">
			</div>
		</form>
	</div>
</div>

	
	
<script type="text/javascript">
$(function(){
	$("#apply").click(function(){
		if(!$("#findPasswordForm").checkall())
			return false;
		if($("#passwd").val()!=$("#conpasswd").val()){
			alert("密码不一致");
			return false;
		}
		var options = {
				url : "${ctx}/api/shop/findPassword/reset-password.do?ajax=yes",
				type : "POST",
				dataType : "json",
				success : function(result) {
					if(result.result==0){
						alert(result.message);
					}else{
						location.href="index.html";
						alert(result.message);
					}
			 	},
			 	error : function(e) {
			 		alert('出现错误，请重试');
				}
			};
		
		$("#findPasswordForm").ajaxSubmit(options);
	});
})
</script>
<#include 'common/footer.html' />